package com.xp.interview.service.impl;

import com.xp.interview.dao.NoteModelRepository;
import com.xp.interview.model.NoteModel;
import com.xp.interview.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by xp on 15/10/14.
 */
@Service
public class IndexServiceImpl implements IndexService {

    @Autowired
    private NoteModelRepository noteModelRepository;

    public List<NoteModel> getNotes() {
        List<NoteModel> notes = noteModelRepository.findAll();

        return notes;
    }
}
